import 'package:flutter_base/common/entitys/entitys.dart';
import 'package:flutter_base/common/utils/utils.dart';
import 'package:flutter_base/common/values/values.dart';
import 'package:flutter_base/global.dart';
import 'package:flutter/material.dart';

/// 工作
class WorkAPI {
  ///工作 入口
  static Future<WorkListResponseEntity> list({
    required BuildContext context,
    params,
    bool refresh = false,
    bool cacheDisk = false,
  }) async {
    var response = await HttpUtil().get(
      // '/workflow/industry/group/list?pageSize=10000&pageNumber=1',
      '/zjl/api/auth/base/user/funList?userCode=${Global.profile.users!.userGuid}&platformCode=1',
      context: context,
      params: params,
      refresh: refresh,
      cacheDisk: cacheDisk,
      cacheKey: STORAGE_INDEX_NEWS_CACHE_KEY,
    );
    return WorkListResponseEntity.fromJson(response);
  }
}